package com.itheima.demo1;

public interface Eatable1 {
    void eat();
}
 class Test{
     public static void main(String[] args) {
         getEatable(new Eatable() {
             @Override
             public void eat() {
                 System.out.println("123456");
             }
         });
         getEatable(() -> System.out.println("123456")
         );
     }
     public static void getEatable(Eatable eatable){
         eatable.eat();
     }
}